#include <bits/stdc++.h>
#define int long long
using namespace std;

int n, m, q, t, pos[17], a[17];

struct Matrix {
    int n, m, a[17][17];
    Matrix(int N, int M)
    {
        n = N, m = M;
        memset(a, 0, sizeof a);
    }
    Matrix operator*(Matrix& b)
    {
        Matrix c(n, b.m);
        for (int i = 1; i <= n; i++)
            for (int j = 1; j <= b.m; j++)
                for (int k = 1; k <= m; k++)
                    c.a[i][j] += a[i][k] * b.a[k][j], c.a[i][j] %= 1000000007;
        return c;
    }
};

Matrix quick_pow(Matrix& a, int k)
{
    Matrix ans(a.n, a.n);
    for (int i = 1; i <= a.n; i++)
        ans.a[i][i] = 1;
    while (k) {
        if (k & 1)
            ans = ans * a;
        a = a * a;
        k >>= 1;
    }
    return ans;
}

signed main()
{
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    cin >> n >> m >> q;
    for (int i = 0; i < (1 << (m - 1)); i++)
        if (__builtin_popcount(i) <= q)
            a[++t] = i, pos[i] = t;
    Matrix p(t, t);
    for (int i = 1; i <= t; i++) {
        p.a[pos[a[i] >> 1]][i] = 1;
        if (__builtin_popcount(a[i]) != q)
            p.a[pos[(a[i] >> 1) + (1 << (m - 2))]][i] = 1;
    }
    Matrix ans = quick_pow(p, n);
    int cnt = 0;
    for (int i = 1; i <= t; i++)
        cnt += ans.a[i][i], cnt %= 1000000007;
    cout << cnt;
    return 0;
}